Component({
    properties: {},
    data: {},
    methods: {
        onReady() {
            const eventChannel = this.getOpenerEventChannel()
            eventChannel.on('getHouseRoomNum', (data) => {
                this.setData({
                    houseRoomNum: data
                })
            })
        },
        change(event) {
            console.log(event)
            this.setData({
                ['houseRoomNum.' + event.currentTarget.dataset.name]: event.detail
            })
        },
        submit() {
            const eventChannel = this.getOpenerEventChannel()
            eventChannel.emit('setHouseRoomNum', this.data.houseRoomNum)
            wx.navigateBack()
        }
    }
});
